﻿using System;
using System.Linq;
using ASPNETVN.PORTAL.Components.UI;
using ASPNETVN.PORTAL.Modules.ANNOUNCEMENT.Components;

namespace ASPNETVN.PORTAL.Modules.ANNOUNCEMENT.Controls
{
    public partial class ViewContent : ItemControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                if (this.ItemID > 0)
                {
                    Item item = Item.Load(this.ItemID);
                    if (item != null)
                    {
                        // Tiêu đề
                        lblTitle.Text = item.Title;
                        // Nội dung.
                        lblContent.Text = Server.HtmlDecode(item.Description);
                    }
                }
            }
        }
    }
}